### -*- coding: utf-8 -*- #############################################
# Разработано Паэглит Арвидом (http://arvid.dp.ua/)
# Все права защищены, 2007
#
# Developed by Paeglit Arvid (http://arvid.dp.ua/)
# All right reserved, 2007
#######################################################################

"""Interfaces for generation

$Id: interfaces.py 64 2007-12-28 18:34:23Z Arvi3D $
"""
__author__  = "Arvid"
__license__ = "GPL"
__version__ = "$Revision: 64 $"
__date__ = "$Date: 2007-12-28 20:34:23 +0200 (Fri, 28 Dec 2007) $"

from zope.interface import Interface, Attribute, invariant, Invalid
from zope import schema
from zope.interface import implements
from zope.app.container.constraints import contains, containers

_ = lambda x : x

class IGeneration(Interface):

    dimension = schema.Int(
                           title = _(u"Dimension")
                           ,description = _(u"Number of elements")
                           ,default = 100
                           ,min = 50
                           ,required = True
                           )

    weight =  schema.Float(
                           title = _(u"Weight")
                           ,description = _(u"Weight of first selection in common selection")
                           ,default = 0.5
                           ,min = 0.0
                           ,max = 1.0
                           ,required = True
                           )

class IExploringForm(Interface):

    weightStep = schema.Float(
                           title = _(u"Step by weight")
                           ,description = _(u"Step by weight")
                           ,default = 0.1
                           ,min = 0.001
                           ,max = 0.5
                           ,required = True
                           )

    minLambda = schema.Float(
                           title = _(u"Minimum lambda")
                           ,description = _(u"Minimum lambda")
                           ,default = 1.0
                           ,min = 0.001
                           ,required = True
                           )

    maxLambda = schema.Float(
                           title = _(u"Maximum lambda")
                           ,description = _(u"Maximum lambda")
                           ,default = 10.0
                           ,min = 0.001
                           ,required = True
                           )

    lambdaStep = schema.Float(
                           title = _(u"Step by parameter lambda")
                           ,description = _(u"Step by parameter lambda")
                           ,default = 1.0
                           ,min = 0.001
                           ,required = True
                           )
